import { AuthService } from './auth.service';
import { Controller, Post, Body, Get, UseGuards } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { LoginDto } from './dto/LoginDto';
import { Result } from 'src/utils/result';
import { JwtAuthGuard } from '../../common/guards/jwt-auth.guard';

@Controller()
export class AuthController {
  constructor(private readonly authService: AuthService) {}

  @Post('/login')
  login(@Body() loginDto: LoginDto) {
    return this.authService.login(loginDto);
  }

  @Get('/test')
  test() {
    return Result.success('test success');
  }
}
